package AbstractFactoryPattern;

/**
 * @version: java version 1.8
 * @Author: Zheng
 * @description:
 * @date: 2022-08-10 20:44
 */
public class ShapeFactory extends AbstractFactory{
    @Override
    public Color getColor(String color) {
        return null;
    }

    @Override
    public Shape getShape(String shape) {
        if (shape==null){
            return null;
        }else if (shape.equalsIgnoreCase("Circle")){
            return new Circle();
        }else if (shape.equalsIgnoreCase("RECTANGLE")){
            return new Rectangle();
        }else if (shape.equalsIgnoreCase("SQUARE")){
            return new Square();
        }
        return null;
    }
}
